import gpio
import os
from LedClass import Led

lightflag = 0

#用于调用开窗帘的对象
Lt1=[led1,led2,led3,led4,led5]=[Led(13),Led(10),Led(14),Led(9),Led(5)]
for i in range(5):
    Lt1[i].off()

def win_callback(cb_arg):
    global lightflag
    if lightflag == 0:
        print('button callback1')
        for i in range(5):
            Lt1[i].on()
            os.msleep(100)
            lightflag=1
    else:
        for i in range(4,-1,-1):
            Lt1[i].off()
            os.msleep(100)
            lightflag=0



